home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
examples
/
exam04
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-27
|
2KB
|
116 lines
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/
#include "generics.h"
main(int argc, char *argv[])
{
object linkObject;
InitDynace(&argc);
/* Create a new LinkObject */
linkObject = gNew(LinkObject);
/* Print the entire link object out */
gPrint(linkObject, stdoutStream);
/* Add a new object to the beginning of the list and print */
gAddFirst(linkObject, gNewWithStr(String, "The first element added."));
gPrint(linkObject, stdoutStream);
/* Add a new object to the beginning of the list and print */
gAddFirst(linkObject, gNewWithDouble(DoubleFloat, 3.14159));
gPrint(linkObject, stdoutStream);
/* Add a new object to the end of the list and print */
gAddLast(linkObject, gNewWithLong(LongInteger, 186282L));
gPrint(linkObject, stdoutStream);
/* Print the first element of the list and the whole list again */
gPrint(gFirst(linkObject), stdoutStream);
gPrint(linkObject, stdoutStream);
/* Dispose of last element and print list */
gDeepDisposeLast(linkObject);
gPrint(linkObject, stdoutStream);
/* Dispose of first element and print list */
gDeepDisposeFirst(linkObject);
gPrint(linkObject, stdoutStream);
/* Dispose of the entire link object and all objects held */
/* (again only necessary of garbage collector not used) */
gDeepDispose(linkObject);
return 0;
}
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/